﻿<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:MVBuddy.Common.Controls" x:Class="MVBuddy.Common.Controls.TileBackBackgroundControl" xmlns:model="clr-namespace:MVBuddy.Common.Model"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="210" d:DesignWidth="210" mc:Ignorable="d"
	Height="210" Width="210" RenderTransformOrigin="0.5,0.5">
    
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/MVBuddy.Common;component/Controls/Styles.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>
	<UserControl.RenderTransform>
		<CompositeTransform ScaleX="{Binding Scale}" ScaleY="{Binding Scale}"/>
	</UserControl.RenderTransform>

	<UserControl.DataContext>
		<model:TileData/>
	</UserControl.DataContext>
    
    <Grid x:Name="LayoutRoot">
    	<Grid.Background>
    		<SolidColorBrush Color="#FF111111"/>
    	</Grid.Background>
    	<StackPanel Margin="8,0,0,0">
    		<TextBlock TextWrapping="Wrap" FontSize="{StaticResource PhoneFontSizeLarge}" Text="{Binding UserData.Username}" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
    		<Grid>
    			<Grid.RowDefinitions>
    				<RowDefinition Height="Auto"/>
    				<RowDefinition Height="Auto"/>
    				<RowDefinition Height="Auto"/>
    			</Grid.RowDefinitions>
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="Auto"/>
    				<ColumnDefinition/>
    			</Grid.ColumnDefinitions>
    			<Border Margin="0,2">
    				<Border.Background>
    					<SolidColorBrush Color="{StaticResource MVDarkOrange}"/>
    				</Border.Background>
    				<TextBlock TextWrapping="Wrap" Text="{Binding UserData.NotificationData.NotificationCount}" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="12,0" FontWeight="Bold" FontSize="{StaticResource PhoneFontSizeMedium}" FontFamily="{StaticResource PhoneFontFamilyLight}"/>
    			</Border>
                <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Path=LocalizedResources.NotificationPlural, Source={StaticResource LocalizedStrings}}" Grid.Column="1" VerticalAlignment="Bottom" Margin="4,0,0,2" FontSize="{StaticResource PhoneFontSizeMedium}" FontFamily="{StaticResource PhoneFontFamilyLight}">
    				<TextBlock.Foreground>
    					<SolidColorBrush Color="{StaticResource MVDarkOrange}"/>
    				</TextBlock.Foreground>
    			</TextBlock>
    			<Border Grid.Row="1" Margin="0,2">
    				<Border.Background>
    					<SolidColorBrush Color="{StaticResource MVDarkOrange}"/>
    				</Border.Background>
    				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding UserData.NotificationData.FavoriteCount}" VerticalAlignment="Bottom" Margin="12,0" FontWeight="Bold" FontSize="{StaticResource PhoneFontSizeMedium}" FontFamily="{StaticResource PhoneFontFamilyLight}"/>
    			</Border>
                <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Path=LocalizedResources.FavouritePlural, Source={StaticResource LocalizedStrings}}" Grid.Row="1" Grid.Column="1" VerticalAlignment="Bottom" Margin="4,0,0,2" FontSize="{StaticResource PhoneFontSizeMedium}" FontFamily="{StaticResource PhoneFontFamilyLight}">
    				<TextBlock.Foreground>
    					<SolidColorBrush Color="{StaticResource MVDarkOrange}"/>
    				</TextBlock.Foreground>
    			</TextBlock>
    			<Border Grid.Row="2" Margin="0,2">
    				<Border.Background>
    					<SolidColorBrush Color="{StaticResource MVDarkOrange}"/>
    				</Border.Background>
    				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding UserData.NotificationData.MessageCount}" VerticalAlignment="Bottom" Margin="12,0" FontWeight="Bold" FontSize="{StaticResource PhoneFontSizeMedium}" FontFamily="{StaticResource PhoneFontFamilyLight}"/>
    			</Border>
                <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Path=LocalizedResources.MessagePlural, Source={StaticResource LocalizedStrings}}" Grid.Row="2" Grid.Column="1" VerticalAlignment="Bottom" Margin="4,0,0,2" FontSize="{StaticResource PhoneFontSizeMedium}" FontFamily="{StaticResource PhoneFontFamilyLight}">
    				<TextBlock.Foreground>
    					<SolidColorBrush Color="{StaticResource MVDarkOrange}"/>
    				</TextBlock.Foreground>
    			</TextBlock>
    		</Grid>
    	</StackPanel>

    </Grid>
</UserControl>